//
//  CustomPlayer.h
//  RoadshowTreasure
//
//  Created by YangLiang on 2016/10/17.
//  Copyright © 2016年 Adinnet. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVPlayer.h>
#import <AVFoundation/AVPlayerItem.h>

@interface CustomPlayer : NSObject

//单例
+ (id)sharedInstance;

//播放器
@property (nonatomic, strong) AVPlayer *sourcePlayer;
//播放路径
@property (nonatomic, strong) NSString *customPlayerStr;

//播放
- (void)sourcePlay;
//暂停
- (void)sourceStop;
//设置播放时间
- (void)playToTimeWith:(CMTime)time withInteger:(NSInteger)value;
//移除通知 & KVO
- (void)removeObserverAndNotification;

//正在播放回调
@property (nonatomic, strong) void(^customPlayerShowBlock)(NSString *second, NSString *allTime);
//未播放回调
@property (nonatomic, strong) void(^customPlayerShowTime)(NSString *second);
//播放结束回调
@property (nonatomic, strong) void(^customPlayerShowFinish)(NSString *allTime);

//是否加载播放View
@property (nonatomic, strong) void(^customPlayerIsShowPlayView)(BOOL isShow);


@end
